<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page session="true"%>
<html>
<head>
	<link rel="stylesheet" media="all" type="text/css" href="<c:url value="/resources/css/styles.css" />">
	<title>Login Page</title>
</head>
<body>
	
	<div class="header">
		<!--  <h1>Login Form</h1>-->
	</div>
	<div id="form-box">
		<h3>Enter username and password</h3>
		
		<c:if test="${not empty error}">
			<div class="error">${error}</div>
		</c:if>
		<c:if test="${not empty msg}">
			<div class="msg">${msg}</div>
		</c:if>
		
		<form name='loginForm' action="<c:url value='j_spring_security_check' />" method='POST'>
			<table>
				<tr>
					<td>User:</td>
					<td><input type='text' name="j_username"></td>
				</tr>
				<tr>
					<td>Password:</td>
					<td><input type='password' name="j_password" /></td>
				</tr>
				<tr></tr>
				<tr></tr>
			</table>			
			<br/>
			<input id='submitButton' name="login" type="submit"	value="Login" /> 
			<input type="hidden" name="${_csrf.parameterName}"
				value="${_csrf.token}" />
		</form>
	</div>

</body>
</html>